//
//  NSString+XM.h
//  XMSimonUtils
//
//  Created by 徐盟 on 2023/7/31.
//  Copyright © 2023 xumeng. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (XM)

- (NSString *) trim;
- (NSString *) trimAString:(NSString *)aString;
- (NSString *) leftTrimAString:(NSString * _Nullable)aString;
- (NSString *) rightTrimAString:(NSString * _Nullable)aString;
/**
 *  替换原字符串
 */
- (NSString *) replaceAll:(NSString*)origin with:(NSString*)replacement;

/**
 *  按指定字符分割字符串
 */
- (NSArray *) split:(NSString*) separator;

- (NSString *) toLowerCase;

- (NSString *) toUpperCase;

- (NSString *) substringFromIndex:(int)beginIndex toIndex:(int)endIndex;




- (CGSize)sizeWithFont:(CGFloat)fontSize;
- (CGSize)sizeWithFont:(CGFloat)fontSize maxSize:(CGSize)maxSize;

- (CGSize)sizeWithFont:(CGFloat)fontSize maxSize:(CGSize)maxSize andlineSpacing:(CGFloat) lineSpaceing;

@end

NS_ASSUME_NONNULL_END
